import request from '@/common/request'

// 验证二维码是否可用
export function checkCode(code) {
  return request({
    url: '/quality/sampling/validateQrCode',
    method: 'post',
	data:{
		qrCode: code,
		version: 1
	}
  })
}

// 获取检测分类信息
export function getTypes() {
  return request({
    url: '/quality/sampling/types',
    method: 'get'
  })
}

// 获取原材料信息
export function getOptions(data) {
  return request({
    url: '/quality/material/queryMaterialMap',
    method: 'get',
    params:data
  })
}

// 根据分类id查询取样表单
export function getFormField(typeId) {
  return request({
    url: '/quality/sampling/formField/'+typeId,
    method: 'get'
  })
}

// 保存取样数据
export function save(data) {
  return request({
    url: '/quality/sampling/submit',
    method: 'post',
    data: data
  })
}

// 查询模型配置
export function BimConfigu(query) {
	return request({
		url: '/quality/visualization/bim_config',
		method: 'get',
		params: query
	})
}